package 多线程;

public class T2 implements Runnable{

    @Override
    public void run() {
        //run方法线程体
        for (int i = 0; i < 200; i++) {
            System.out.println("我在看代码---"+i);
            String n=Thread.currentThread().getName();
            System.out.println(n);
        }
    }
    public static void main(String[] args) {
//        //创建runnbale接口的实现类对象
//        //方法一
        T2 t2=new T2();
        Thread thread=new Thread(t2, "jj");
        thread.start();
    }
}
